package com.fh.shop.api.config;

import lombok.Data;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "system")
public class SystemConfig {

//    public static String host;
//
//    @Value("${redis.host}")
//    public void setHost(String h) {
//        SystemConfig.host = h;
//    }

    public static RedisConfig redis;

    public void setRedis(RedisConfig r) {
        SystemConfig.redis = r;
    }

    public static class RedisConfig {
        public static String host;
        public static int port;

        public void setHost(String h) {
            RedisConfig.host = h;
        }

        public void setPort(int p) {
            RedisConfig.port = p;
        }

    }






}
